<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .outer{
              height: 200px;
              width: 200px;
              border: 1px solid red;
              position: relative;
              overflow: hidden;
        }
       .outer .inner1{
            width: 200px;
            height: 200px;
            background-image: url(./img/img3.jpeg);
            left: 0;
            background-size: contain;
            background-repeat: no-repeat;  
          
            position: absolute;
    transition:  left 0.3;
        
          
        }
        .inner2{
            width: 200px;
            height: 200px;
            left: -200px;
            background-image: url(./img/img1.jpg);
            position: absolute;
            background-size: contain;
            background-repeat: no-repeat;  
          
            left: 200px;
        }
        .outer:hover .inner1{
              
            left: 200px;

        }
        .outer:hover .inner2{
            left: 0px;
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="inner1"></div>
        <div class="inner2"></div>
    </div>
</body>
</html>